<!DOCTYPE html>
<html>

<head>
    <title>营销中心</title>
    <meta charset="utf-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_950377_g4e7evbmoq.css">
    <link rel="stylesheet" type="text/css" href="../css/base.css">
    <link rel="stylesheet" type="text/css" href="../css/animate.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <script src="../js/jquery.js"></script>
    <script src="../js/flexible.js"></script>

    <style>
        body{padding-bottom: 1rem;}
        /* .block_item{display: flex;justify-content: center;align-items: center; height: 1rem;} */
        .block_item{ padding: .2rem;}
        .block_item .tit{color: #000;font-weight: bold;font-size: .34rem;}
        .block_item dl{display: flex;align-items: center;padding: .2rem 0;}
        .block_item dl dt{ margin-right: .2rem;color: #666;}
        .block_item dl dd{flex: 1;}
        .block_item dl dd input{border: none; background: #f0f0f0; line-height: .6rem; text-indent: .1rem;width:4.1rem;}
        .block_item dl dd input.duan{width: 1.6rem;}
        .dqleixing span{border: #e6e6e6 solid 1px;display: inline-block;padding:.04rem .1rem; margin-right: .2rem;}
        .dqleixing span.on{background: #148ceb;border: #148ceb solid 1px;color: #fff;}
        .dqleixing2{display: none;}
        .block2 .dqleixing span{ margin-bottom: .2rem;}
        .block2 dl{ padding-bottom: 0;}
        .footer{position: fixed;bottom: 0;left: 0;right: 0;width: 100%;display: flex;align-items: center; z-index: 15;}
        .footer .btn_default{ flex: 1; background: #148ceb;border-radius:0;line-height: 1rem;border:none;}
    </style>
</head>

<body class="bgf9f9f9">
    <div class="nav">
        <div class="newtit">
            <div class="l"> <i class="iconfont icon-fanhui1" onClick="javascript:history.back(-1)"></i> <span
                    data-title="|">新增优惠券</span>
            </div>
        </div>
    </div>
    <div class="form1">
        <div class="block_item">
            <div class="tit">下单类型</div>
            <dl>
                    <dd class="dqleixing" id="xdleixing">
                        <span class="on">仅限优惠买单</span>
                        <span>仅限线上点餐</span>
                        <span>不限</span>
                    </dd>
                </dl>
            <dl>
                <dt>消费金额</dt>
                <dd><input type="text" name=""/></dd>
            </dl>
            <dl>
                    <dt>减免金额</dt>
                    <dd><input type="text" name=""/></dd>
                </dl>
                <dl>
                        <dt>到期类型</dt>
                        <dd class="dqleixing" id="dqleixing">
                            <span class="on">领取后生效</span>
                            <span>指定时间</span>
                        </dd>
                    </dl>
                    <dl class="dqleixing1">
                            <dt>有效天数</dt>
                            <dd><input type="text" name="" class="duan"/> 天</dd>
                        </dl>
                        <div class="dqleixing2">
                        <dl>
                                <dt>开始时间</dt>
                                <dd><input type="date" name="" value="" /></dd>
                            </dl>
                            <dl>
                                    <dt>结束时间</dt>
                                    <dd><input type="date" name="" value=""/></dd>
                                </dl>
                            </div>
        </div>
        <div class="block_item block2">
                <div class="tit">不可用日期</div>
                <dl>
                        <dd class="dqleixing" id="bkydate">
                            <span>每周一</span>
                            <span>每周二</span>
                            <span>每周三</span>
                            <span>每周四</span>
                            <span>每周五</span>
                            <span>每周六</span>
                            <span>每周日</span>
                        </dd>
                    </dl>
        </div>
        <div class="block_item">
                <div class="tit">适用对象</div>
                <dl>
                        <dd class="dqleixing" id="sydx">
                            <span>仅限会员适用</span>
                            <span>仅限首次本店下单</span>
                            <span class="on">不限</span>
                        </dd>
                    </dl>
        </div>
        <div class="block_item">
                <dl>
                        <dt>发放数量</dt>
                        <dd><input type="text" name="" class="duan"/> 张<span class="color999">(输入0则不限制)</span></dd>
                    </dl>
        </div>
    </div>
    <div class="footer">
        <span class="btn_default">确认添加</span>
    </div>
</body>
<script>
$('#xdleixing span').click(function(){
    $(this).addClass('on').siblings().removeClass('on');
})
$('#dqleixing span').click(function(){
    var index=$(this).index();
    if(index==0){
        $('.dqleixing1').show();
        $('.dqleixing2').hide();
    }else{
        $('.dqleixing1').hide();
        $('.dqleixing2').show();
    }
    $(this).addClass('on').siblings().removeClass('on');
})
$('#bkydate span').click(function(){
    var status=$(this).hasClass('on');
    if(status){
        $(this).removeClass('on');
    }else{
        $(this).addClass('on');
    }
})
$('#sydx span').click(function(){
    $(this).addClass('on').siblings().removeClass('on');
})
</script>
</html>